<template>
  <div>
      <el-tabs type="border-card">
        <el-tab-pane label="资源信息">
          <el-table
            ref="resourceTable"
            :data="resourceTableList"
            highlight-current-row
            @current-change="handleCurrentChange"
            style="width: 100%">
            <el-table-column
              label="编号"
              type="index">
            </el-table-column>
            <el-table-column
              property="resourceName"
              label="资源名称"
              width="180">
            </el-table-column>
            <el-table-column
              property="resourceLink"
              label="资源链接"
              width="200">
            </el-table-column>
            <el-table-column
              property="other"
              label="其他说明">
            </el-table-column>
            <el-table-column
              property="type"
              label="资源类型">
            </el-table-column>
            <el-table-column
              property="dateTime"
              label="最后编辑时间">
            </el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
  </div>
</template>

<script>
export default {
  name:"ResourceComplex",
  data() {
    return {
      resourceTableList:[]
    }
  },
  mounted() {
    this.initResource();
  },
  methods: {
    initResource() {
      let page = 1;
      this.getRequest('/resource/getResources?page='+page).then((resp) => {
        if (resp) {
          this.resourceTableList = resp;
          console.log(resp);
        }
      })
    },
    handleCurrentChange(val) {
      this.currentRow = val;
    },
  }
}
</script>

<style>

</style>